Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: log form updates #2063

Merged
merged 4 commits into from
Jun 8, 2021
Merged

feat: log form updates #2063

merged 4 commits into from
Jun 8, 2021

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Jun 3, 2021

Problem

Closes #2056

Tests

  • Create a form with short text field. Edit the field. Check that the edit action shows up in the logs with details of the edit under body meta.

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our logging setup is complicated enough as is - I think you should extend loggingMiddleware's dynamicMeta function in logging.ts instead.

Bonus points if you can spot quick refactors at the same time.

@tshuli
Copy link
Contributor Author

tshuli commented Jun 3, 2021

@liangyuanruo thoughts for your consideration

logging it via loggingMiddleware would capture body data from all requests - even submission responses, which we don't want to store in logs

We could set a condition to log the body only if the url corresponds to an admin form route, but then isn't it neater to do it at the admin form router level?

@mantariksh
Copy link
Contributor

We could set a condition to log the body only if the url corresponds to an admin form route, but then isn't it neater to do it at the admin form router level?

I agree w this

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, agree with you and Antariksh. will approve first

@tshuli
Copy link
Contributor Author

tshuli commented Jun 7, 2021

@mantariksh thanks for reviewing, pls see if proposed logging of query params is ok

@tshuli tshuli requested a review from mantariksh June 7, 2021 02:02
@tshuli
Copy link
Contributor Author

tshuli commented Jun 8, 2021

thanks @mantariksh :)

@tshuli tshuli merged commit 9a62939 into develop Jun 8, 2021
@tshuli tshuli deleted the feat/log-form-updates branch June 8, 2021 02:55
@karrui karrui mentioned this pull request Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log all updates to forms
3 participants